public class lk6263 {
    public static void main(String[] args) {
        int[] a = new int[]{0,3,9};
        System.out.println(maxJump(a));
    }
    public static int maxJump(int[] stones) {
        int n = stones.length;
        int max=0;
        int e=0;
        for(int i=1;i<n;i++){
            if(i==1){
                e=Math.abs(stones[1]-0);
                max=Math.max(max, e);
            }else {
                e=Math.abs(stones[i]-stones[i-2]);
                max=Math.max(max, e);
            }
            if(i==n-1){
                e=Math.abs(stones[i]-stones[i-1]);
                max=Math.max(max, e);
            }
        }
        return max;
    }
}
